import { isFunction } from 'lodash-es'
/**
 * @description: 获取函数
 * @param {object} source 源对象
 * @param {string} name 名称
 * @return {function}
 */
export function getFunction(source, name) {
  const fn = source[name]
  return isFunction(fn) ? fn : rest => rest
}
